<template>
  <div>
    {{ food.shopName }}
    <button @click="delFood">-</button>
    <span>{{ food.count }}</span>
    <button @click="addFood">+</button>
  </div>
</template>

<script>
export default {
  props: ["food", "index"],
  methods: {
    addFood() {
      this.$emit("changeAction", "add", this.index);
    },
    delFood() {
      this.$emit("changeAction", "del", this.index);
    },
  },
};
</script>

<style>
</style>